#include "TestBuffer.h"

/*!
 * \brief
 * Write brief comment for TestBuffer here.
 * 
 * \param size
 * Description of parameter size.
 * 
 * \throws <exception class>
 * Description of criteria for throwing this exception.
 * 
 * Write detailed description for TestBuffer here.
 * 
 * \remarks
 * Write remarks for TestBuffer here.
 * 
 * \see
 * Separate items with the '|' character.
 */
TestBuffer::TestBuffer(int size)
{
    D3D10_SUBRESOURCE_DATA bufferResourceData;
    bufferResourceData.pSysMem = positions;

    // Descripcion del buffer en GPU
    D3D10_BUFFER_DESC bufferDesc16BytesParticles;
    bufferDesc16BytesParticles.Usage            = D3D10_USAGE_DEFAULT;
    bufferDesc16BytesParticles.ByteWidth        = sizeof(float4) * size;
    bufferDesc16BytesParticles.BindFlags        = D3D10_BIND_VERTEX_BUFFER;
    bufferDesc16BytesParticles.CPUAccessFlags   = 0;
    bufferDesc16BytesParticles.MiscFlags        = 0;

    // Creamos el buffer en GPU
    if (FAILED( device->CreateBuffer( &bufferDesc16BytesParticles, &bufferResourceData, &gpu )))
        return E_FAIL;
}

TestBuffer::~TestBuffer(void)
{
}
